package com.wn.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yellow Docter
 * @date 2023 -08-08
 * @desc
 */
@RestController
@RequestMapping("user")
@RefreshScope
public class UserController {
    @Value("${title}")
    private String title;

    @Value("${server.port}")
    private int port;

    @GetMapping("/get")
    public String get() {
        return title;
    }

    @GetMapping("/port")
    public int getPort() {
        return port;
    }

}
